/**
  @file     	DESIGNPATTERN_Builder.h 
  @brief    	1.When the algorithm to create complex object should be independent of the part of the object, 
                  as well as their assembly;
				2.When construction process must be allowed to construct the object is different;
  @author  	arvin
  @version 	1.0   2012/12/20
 */

#ifndef CXX_DESIGNPATTERN_BUILDER_H
#define CXX_DESIGNPATTERN_BUILDER_H
#include "ProductDef.h"

class AbstractComputer;
class Mouse;
class Keyboard;
class Monitor;
class Host;

class Builder
{
public:
	/**
	* Destruction
	*
	* @param VOID
	* @return 
	*/
	virtual ~Builder();

	/**
	* Build Mouse
	*
	* @param VOID
	* @return Mouse*
	* @note build and process product
	*/
	virtual Mouse* BuildMouse() = 0;

	/**
	* Build Keyboard
	*
	* @param VOID
	* @return Keyboard*
	* @note build and process product
	*/
	virtual Keyboard* BuildKeyboard() = 0;

	/**
	* Build Monitor
	*
	* @param VOID
	* @return Monitor*
	* @note build and process product
	*/
	virtual Monitor* BuildMonitor() = 0;

	/**
	* Build Host
	*
	* @param VOID
	* @return Host*
	* @note build and process product
	*/
	virtual Host* BuildHost() = 0;

	/**
	* GetManufacturer
	*
	* @param VOID
	* @return MANUFACTURER_TYPE
	*/
	MANUFACTURER_TYPE GetManufacturer();
protected:
	/**
	* Construction
	*
	* @param MANUFACTURER_TYPE eManufacturer
	* @return 
	*/
	Builder(MANUFACTURER_TYPE eManufacturer);

	/**
	* SetManufacturer
	*
	* @param MANUFACTURER_TYPE eManufacturer
	* @return
	*/
	VOID SetManufacturer(MANUFACTURER_TYPE eManufacturer);

private:
	/**
	* Construction
	*
	* @param VOID
	* @return
	*/
	Builder();

	/**
	* Copy Construction
	*
	* @param const Builder& cBuilder
	* @return 
	*/
	Builder(const Builder& cBuilder);

	/**
	* Assignment
	*
	* @param const Builder& cBuilder
	* @return Builder&
	*/
	Builder& operator=(const Builder& cBuilder);

public:
protected:
private:
	MANUFACTURER_TYPE m_eManufacturer;
};

class DELLBuilder : public Builder
{
public:
	/**
	* Destruction
	*
	* @param VOID
	* @return 
	*/
	virtual ~DELLBuilder();

	/**
	* Instance
	*
	* @param VOID
	* @return DELLBuilder*
	* @note singleton
	*/
	static DELLBuilder* Instance();
	
	/**
	* Destroy
	*
	* @param VOID
	* @return VOID
	* @note singleton
	*/
	static VOID Destroy();

protected:
private:
	/**
	* Construction
	*
	* @param VOID
	* @return 
	*/
	DELLBuilder();

	/**
	* Copy Construction
	*
	* @param const DELLBuilder& cDELLBuilder
	* @return 
	*/
	DELLBuilder(const DELLBuilder& cDELLBuilder);

	/**
	* Assignment
	*
	* @param const DELLBuilder& cDELLBuilder
	* @return DELLBuilder&
	*/
	DELLBuilder& operator=(const DELLBuilder& cDELLBuilder);

	/**
	* Build Mouse
	*
	* @param VOID
	* @return Mouse*
	* @note build and process product
	*/
	virtual Mouse* BuildMouse();

	/**
	* Build Keyboard
	*
	* @param VOID
	* @return Keyboard*
	* @note build and process product
	*/
	virtual Keyboard* BuildKeyboard();

	/**
	* Build Monitor
	*
	* @param VOID
	* @return Monitor*
	* @note build and process product
	*/
	virtual Monitor* BuildMonitor();

	/**
	* Build Host
	*
	* @param VOID
	* @return Host*
	* @note build and process product
	*/
	virtual Host* BuildHost();

public:
protected:
private:
	static DELLBuilder* m_pInstance;
};


class ASUSBuilder : public Builder
{
public:
	/**
	* Destruction
	*
	* @param VOID
	* @return 
	*/
	virtual ~ASUSBuilder();

	/**
	* Instance
	*
	* @param VOID
	* @return ASUSBuilder*
	* @note singleton
	*/
	static ASUSBuilder* Instance();
	
	/**
	* Destroy
	*
	* @param VOID
	* @return VOID
	* @note singleton
	*/
	static VOID Destroy();

protected:
private:
	/**
	* Construction
	*
	* @param VOID
	* @return 
	*/
	ASUSBuilder();

	/**
	* Copy Construction
	*
	* @param const ASUSBuilder& cASUSBuilder
	* @return 
	*/
	ASUSBuilder(const ASUSBuilder& cASUSBuilder);

	/**
	* Assignment
	*
	* @param const ASUSBuilder& cASUSBuilder
	* @return ASUSBuilder&
	*/
	ASUSBuilder& operator=(const ASUSBuilder& cASUSBuilder);

	/**
	* Build Mouse
	*
	* @param VOID
	* @return Mouse*
	* @note build and process product
	*/
	virtual Mouse* BuildMouse();

	/**
	* Build Keyboard
	*
	* @param VOID
	* @return Keyboard*
	* @note build and process product
	*/
	virtual Keyboard* BuildKeyboard();

	/**
	* Build Monitor
	*
	* @param VOID
	* @return Monitor*
	* @note build and process product
	*/
	virtual Monitor* BuildMonitor();

	/**
	* Build Host
	*
	* @param VOID
	* @return Host*
	* @note build and process product
	*/
	virtual Host* BuildHost();

public:
protected:
private:
	static ASUSBuilder* m_pInstance;
};

class HPBuilder : public Builder
{
public:
	/**
	* Destruction
	*
	* @param VOID
	* @return 
	*/
	virtual ~HPBuilder();

	/**
	* Instance
	*
	* @param VOID
	* @return HPBuilder*
	* @note singleton
	*/
	static HPBuilder* Instance();
	
	/**
	* Destroy
	*
	* @param VOID
	* @return VOID
	* @note singleton
	*/
	static VOID Destroy();

protected:
private:
	/**
	* Construction
	*
	* @param VOID
	* @return 
	*/
	HPBuilder();

	/**
	* Copy Construction
	*
	* @param const HPBuilder& cHPBuilder
	* @return 
	*/
	HPBuilder(const HPBuilder& cHPBuilder);

	/**
	* Assignment
	*
	* @param const HPBuilder& cHPBuilder
	* @return HPBuilder&
	*/
	HPBuilder& operator=(const HPBuilder& cHPBuilder);

	/**
	* Build Mouse
	*
	* @param VOID
	* @return Mouse*
	* @note build and process product
	*/
	virtual Mouse* BuildMouse();

	/**
	* Build Keyboard
	*
	* @param VOID
	* @return Keyboard*
	* @note build and process product
	*/
	virtual Keyboard* BuildKeyboard();

	/**
	* Build Monitor
	*
	* @param VOID
	* @return Monitor*
	* @note build and process product
	*/
	virtual Monitor* BuildMonitor();

	/**
	* Build Host
	*
	* @param VOID
	* @return Host*
	* @note build and process product
	*/
	virtual Host* BuildHost();

public:
protected:
private:
	static HPBuilder* m_pInstance;
};
#endif	/* >>CXX_DESIGNPATTERN_BUILDER_H<< */
/* EOF */